package com.jsyl.lwbk.business.mapper.education;

import com.jsyl.lwbk.business.domain.ChildCenter;
import com.jsyl.lwbk.business.domain.education.TrainingProgramChildRecord;
import com.jsyl.lwbk.business.domain.education.TrainingProgramChildRecordExample;
import com.jsyl.lwbk.business.dto.ChildMonthResultVO;

import java.util.List;

import org.apache.ibatis.annotations.Param;

public interface TrainingProgramChildRecordMapper {
    long countByExample(TrainingProgramChildRecordExample example);

    int deleteByExample(TrainingProgramChildRecordExample example);

    int insert(TrainingProgramChildRecord record);

    int insertSelective(TrainingProgramChildRecord record);

    List<TrainingProgramChildRecord> selectByExample(TrainingProgramChildRecordExample example);

    int updateByExampleSelective(@Param("record") TrainingProgramChildRecord record, @Param("example") TrainingProgramChildRecordExample example);

    int updateByExample(@Param("record") TrainingProgramChildRecord record, @Param("example") TrainingProgramChildRecordExample example);

    int selectReachCount(@Param("childId") Long childId,
                         @Param("trainingProgramId")Long trainingProgramId,
                         @Param("trainingProgramNumber")String trainingProgramNumber);

    int selectRecordCount(@Param("childId") Long childId,@Param("dayCount")Integer dayCount);
    /**
     * 获取学生单节课成绩
     * @param id
     * @return
     */
    List<TrainingProgramChildRecord> getChildCourseScore(Long id);

    /**
     * 获取学生当月全部成绩
     * @param id
     * @return
     */
    List<ChildMonthResultVO> getChildMonthResult(Long id);

    List<ChildMonthResultVO> getChildClassCount(Long id);

    /**
     * 获取指定月份有上课记录的小孩（生成月度小结使用）
     * @param month
     * @return
     */
    List<ChildCenter> getChildList(String month);

}